import '../item_style.dart';
import '../tooltip.dart';
import 'series.dart';

import 'package:json_annotation/json_annotation.dart';

part 'theme_river_series.g.dart';

@JsonSerializable(includeIfNull: false, explicitToJson: true)
class ThemeRiverEmphasis {
  var focus;
  var blurScope;
  SeriesLabel? label;
  LabelLine? labelLine;
  ItemStyle? itemStyle;

  ThemeRiverEmphasis(
      {this.focus, this.blurScope, this.label, this.labelLine, this.itemStyle});

  factory ThemeRiverEmphasis.fromJson(Map<String, dynamic> json) =>
      _$ThemeRiverEmphasisFromJson(json);

  Map<String, dynamic> toJson() => _$ThemeRiverEmphasisToJson(this);
}

@JsonSerializable(includeIfNull: false, explicitToJson: true)
class ThemeRiverBlurSelectEmphasis {
  SeriesLabel? label;
  LabelLine? labelLine;
  ItemStyle? itemStyle;

  ThemeRiverBlurSelectEmphasis({this.label, this.labelLine, this.itemStyle});

  factory ThemeRiverBlurSelectEmphasis.fromJson(Map<String, dynamic> json) =>
      _$ThemeRiverBlurSelectEmphasisFromJson(json);

  Map<String, dynamic> toJson() => _$ThemeRiverBlurSelectEmphasisToJson(this);
}

@JsonSerializable(includeIfNull: false, explicitToJson: true)
class ThemeRiverData {
  var date;

  var value;

  var name;

  ThemeRiverData({this.date, this.value, this.name});

  factory ThemeRiverData.fromJson(Map<String, dynamic> json) =>
      _$ThemeRiverDataFromJson(json);

  Map<String, dynamic> toJson() => _$ThemeRiverDataToJson(this);
}

@JsonSerializable(includeIfNull: false, explicitToJson: true)
class ThemeRiverSeries extends Series {
  var type = 'themeRiver';
  var id;
  var name;
  var zlevel;
  var z;
  var left;
  var top;
  var right;
  var bottom;
  var width;

  var height;
  var coordinateSystem;
  var boundaryGap;
  var singleAxisIndex;

  SeriesLabel? label;

  LabelLine? labelLine;

  LabelLayout? labelLayout;

  ItemStyle? itemStyle;

  ThemeRiverEmphasis? emphasis;

  ThemeRiverBlurSelectEmphasis? blur;

  ThemeRiverBlurSelectEmphasis? select;

  var selectedMode;

  List<ThemeRiverData>? data;

  Tooltip? tooltip;

  ThemeRiverSeries(
      {this.id,
      this.name,
      this.zlevel,
      this.z,
      this.left,
      this.top,
      this.right,
      this.bottom,
      this.width,
      this.height,
      this.coordinateSystem,
      this.boundaryGap,
      this.singleAxisIndex,
      this.label,
      this.labelLine,
      this.labelLayout,
      this.itemStyle,
      this.emphasis,
      this.blur,
      this.select,
      this.selectedMode,
      this.data,
      this.tooltip});

  factory ThemeRiverSeries.fromJson(Map<String, dynamic> json) =>
      _$ThemeRiverSeriesFromJson(json);

  Map<String, dynamic> toJson() => _$ThemeRiverSeriesToJson(this);
}
